package com.xujicheng.designpattern.learn.factoryMethod;

/**
 * @project:design-pattern-learn
 * @package:com.xujicheng.designpattern.learn.factoryMethod
 * @author:xujicheng
 * @date:2018/8/7
 */
public abstract class PizzaStore {
    public Pizza orderPizza(String type){
        Pizza pizza;
        pizza = createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    protected abstract Pizza createPizza(String type);
}
